package day05;

import java.util.Arrays;

public class txt9 {
    public static void main(String[] args) {
        double[] a = {3, 5, 7, 9, 8, 1};
        Arrays.sort(a);
        System.out.println(Arrays.toString(a));
        double s=0;
        for(int i=1;i<=4;i++){
            s=s+a[i];
        }
        System.out.println( s/4);
    }
}
